package com.spring.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by zc on 2016/6/13.
 */
@Configuration
public class AppConfig {

    @Bean(initMethod = "init")
    public Foo foo(){
        return new Foo();
    }

    @Bean(destroyMethod = "cleanup")
    public Bar bar(){
        return new Bar();
    }
}
